package com.sc.nft.entity.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.math.BigDecimal;
import java.util.Date;

@Data
public class FlowRecordVO {

    @ApiModelProperty("标题")
    private String firstTitle;

    private Integer numbering;

    private Integer collectionSumCount;

    @ApiModelProperty("编号")
    private String serialNumber;

    @ApiModelProperty("交易时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date dealTime;

    @ApiModelProperty("价格")
    private String buyPrice;

    public void setBuyPrice(BigDecimal buyPrice) {
        this.buyPrice = buyPrice.setScale(2, BigDecimal.ROUND_DOWN).stripTrailingZeros().toPlainString();
    }

}
